package cn.easybuy.newservice;

import cn.easybuy.entity.User;
import cn.easybuy.mapper.UserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Tequila
 **/
@Service
public class NewUserServiceImpl implements NewUserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public User getUser(Integer userId, String loginName) {
        return userMapper.getUser(userId,loginName);
    }

    @Override
    public boolean add(User user) {
        if (userMapper.add(user) > 0){
            return true;
        }
        return false;
    }
}
